package com.lb.jwitter.service;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import javax.jws.WebService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.lb.jwitter.*;
import com.lb.jwitter.hibernate.*;
import com.lb.jwitter.util.ConditionReport;

@Service("tbl_QLDTTXA_LichKiemTraGKService")
@Transactional
@WebService(endpointInterface = "com.lb.jwitter.service.Tbl_QLDTTXA_LichKiemTraGKService")
public class Tbl_QLDTTXA_LichKiemTraGKServiceImpl implements Tbl_QLDTTXA_LichKiemTraGKService,Serializable {

   private Log log = LogFactory.getLog(Tbl_QLDTTXA_LichKiemTraGKServiceImpl.class);
   private static final long serialVersionUID = -8740095022264495229L;

   @Autowired
   @Qualifier("tbl_QLDTTXA_LichKiemTraGKDAO")
   private Tbl_QLDTTXA_LichKiemTraGKDAO _tbl_QLDTTXA_LichKiemTraGKDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_LopMonHocDAO")
   private Tbl_QLDTTXA_LopMonHocDAO _tbl_QLDTTXA_LopMonHocDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_NhomDAO")
   private Tbl_QLDTTXA_DM_NhomDAO _tbl_QLDTTXA_DM_NhomDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_PhongDAO")
   private Tbl_QLDTTXA_DM_PhongDAO _tbl_QLDTTXA_DM_PhongDao;

   @Autowired
   @Qualifier("tbl_QLDTTXA_DM_TietHocDAO")
   private Tbl_QLDTTXA_DM_TietHocDAO _tbl_QLDTTXA_DM_TietHocDao;

   public final List<Tbl_QLDTTXA_LichKiemTraGK> findAlltbl_QLDTTXA_LichKiemTraGK(int pageSize, int page){
   List<Tbl_QLDTTXA_LichKiemTraGK> result = get_tbl_QLDTTXA_LichKiemTraGKDao().findAll(pageSize, page);
       log.info("Number of user in DB:: "+result.size());
       return result;
   }

   @Transactional(noRollbackFor=IllegalArgumentException.class)
   public final Long createtbl_QLDTTXA_LichKiemTraGK(Tbl_QLDTTXA_LichKiemTraGK obj){
       return _tbl_QLDTTXA_LichKiemTraGKDao.save(obj);
   }

   public final void updatetbl_QLDTTXA_LichKiemTraGK(Tbl_QLDTTXA_LichKiemTraGK obj){
       _tbl_QLDTTXA_LichKiemTraGKDao.update(obj);
   }//end update methode

   public final Tbl_QLDTTXA_LichKiemTraGK gettbl_QLDTTXA_LichKiemTraGK (Long id){
       log.info("Try to retrieve the tbl_QLDTTXA_LichKiemTraGK: "+id);
       return get_tbl_QLDTTXA_LichKiemTraGKDao().get(id);
   }

   public void deletetbl_QLDTTXA_LichKiemTraGK(Long id){
       log.info("Try to delete the tbl_QLDTTXA_LichKiemTraGK by Id : "+ id);
       if(_tbl_QLDTTXA_LichKiemTraGKDao.exists(id)){
	    _tbl_QLDTTXA_LichKiemTraGKDao.delete(id);
       } else {
       	throw new IllegalArgumentException("EmployeeId '"+id+"' does not exists");
       }
   }

   public void deleteListtbl_QLDTTXA_LichKiemTraGK(String[] listId){
       for(String id : listId){
   	    deletetbl_QLDTTXA_LichKiemTraGK(Long.parseLong(id));
       }
   }

   public List<Tbl_QLDTTXA_LichKiemTraGK> findtbl_QLDTTXA_LichKiemTraGKByCondition(List<ConditionReport> cons,int pageSize,int page){ 
       return _tbl_QLDTTXA_LichKiemTraGKDao.findByCondition(Tbl_QLDTTXA_LichKiemTraGK.class, cons, pageSize, page); 
   } 
 
   public int counttbl_QLDTTXA_LichKiemTraGKByCondition(List<ConditionReport> cons){ 
       return _tbl_QLDTTXA_LichKiemTraGKDao.countByCondition(Tbl_QLDTTXA_LichKiemTraGK.class, cons); 
   } 
 
   public final Tbl_QLDTTXA_LichKiemTraGKDAO get_tbl_QLDTTXA_LichKiemTraGKDao() {
   	return _tbl_QLDTTXA_LichKiemTraGKDao;
   }
   public final void set_tbl_QLDTTXA_LichKiemTraGKDao(Tbl_QLDTTXA_LichKiemTraGKDAO obj) {
   	this._tbl_QLDTTXA_LichKiemTraGKDao = obj;
   }

   public Tbl_QLDTTXA_LopMonHocDAO get_tbl_QLDTTXA_LopMonHocDao() {
       return _tbl_QLDTTXA_LopMonHocDao;
   }
   public void set_tbl_QLDTTXA_LopMonHocDao(Tbl_QLDTTXA_LopMonHocDAO _tbl_QLDTTXA_LopMonHocDao) {
       this._tbl_QLDTTXA_LopMonHocDao = _tbl_QLDTTXA_LopMonHocDao;
   }

   public Tbl_QLDTTXA_DM_NhomDAO get_tbl_QLDTTXA_DM_NhomDao() {
       return _tbl_QLDTTXA_DM_NhomDao;
   }
   public void set_tbl_QLDTTXA_DM_NhomDao(Tbl_QLDTTXA_DM_NhomDAO _tbl_QLDTTXA_DM_NhomDao) {
       this._tbl_QLDTTXA_DM_NhomDao = _tbl_QLDTTXA_DM_NhomDao;
   }

   public Tbl_QLDTTXA_DM_PhongDAO get_tbl_QLDTTXA_DM_PhongDao() {
       return _tbl_QLDTTXA_DM_PhongDao;
   }
   public void set_tbl_QLDTTXA_DM_PhongDao(Tbl_QLDTTXA_DM_PhongDAO _tbl_QLDTTXA_DM_PhongDao) {
       this._tbl_QLDTTXA_DM_PhongDao = _tbl_QLDTTXA_DM_PhongDao;
   }

   public Tbl_QLDTTXA_DM_TietHocDAO get_tbl_QLDTTXA_DM_TietHocDao() {
       return _tbl_QLDTTXA_DM_TietHocDao;
   }
   public void set_tbl_QLDTTXA_DM_TietHocDao(Tbl_QLDTTXA_DM_TietHocDAO _tbl_QLDTTXA_DM_TietHocDao) {
       this._tbl_QLDTTXA_DM_TietHocDao = _tbl_QLDTTXA_DM_TietHocDao;
   }

}//endclass

